Skip to content

Allow additional arguments in use #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 14, 2017
Merged

Allow additional arguments in use #100

merged 2 commits into from
Oct 14, 2017

Conversation

pshrmn
Copy link
Contributor

@pshrmn pshrmn commented Oct 14, 2017

As mentioned in the Plugins guide [1], Vue.use allows for additional arguments [2] to be passed alongside the plugin. This PR modifies the use function in create-local-vue to pass these additional arguments in the instance.use call.

The plugins guide seems to imply that additional options should be passed via a single object, but there doesn't seem to be a requirement for this, so I wrote this to just use rest parameters and spread syntax.

[1] - https://vuejs.org/v2/guide/plugins.html#Using-a-Plugin
[2] - https://github.com/vuejs/vue/blob/049f3171a9d2e97f62c209a4b78a71ec9dae810f/src/core/global-api/use.js#L13-L19

@eddyerburgh eddyerburgh merged commit b80b969 into vuejs:dev Oct 14, 2017
@pshrmn pshrmn deleted the use-args branch October 14, 2017 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants